package com.sdp.khy.baotou.db.khy_user_invoice.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;

import org.springframework.format.annotation.DateTimeFormat;

import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author zsp
 * @since 2023-12-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("khy_user_invoice")
public class KhyUserInvoice extends Model<KhyUserInvoice> {

    private static final long serialVersionUID=1L;

    /**
     * 内码
     */
    @TableId("key_id")
    private String keyId;

    /**
     * 用户手机号
     */
    @TableField("user_no")
    private String userNo;

    /**
     * 发票类型
     */
    @TableField("invoice_type")
    private String invoiceType;

    /**
     * 发票抬头
     */
    @TableField("invoice_title")
    private String invoiceTitle;

    /**
     * 纳税人识别号
     */
    @TableField("invoice_no")
    private String invoiceNo;

    /**
     * 邮箱
     */
    @TableField("user_email")
    private String userEmail;

    /**
     * 开票状态
     */
    @TableField("invoice_status")
    private String invoiceStatus;

    /**
     * 创建时间
     */
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField("create_time")
    private LocalDateTime createTime;
    
    /**
     * 快递单内码
     */
    @TableField("package_id")
    private String packageId;
    
    /**
     * 快递单号
     */
    @TableField("package_no")
    private String packageNo;

    @Override
    protected Serializable pkVal() {
        return this.keyId;
    }

}
